<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
<head>
<%@ include file="/WEB-INF/jsp/admin/inc/taglibs.jsp"%>
	<%@ include file="/WEB-INF/jsp/admin/inc/meta.jsp"%>
     <script type="text/javascript">
            /* <![CDATA[ */
            jQuery(function(){
            	  jQuery("#name").validate({
                      expression: "if (VAL) return true; else return false;",
                      message: "会员名不能为空"
                  });
                  jQuery("#nickName").validate({
                      expression: "if (VAL) return true; else return false;",
                      message: "会员别名不能为空"
                  });
                  jQuery("#password").validate({
                      expression: "if (VAL.length > 5 && VAL) return true; else return false;",
                      message: "密码不能为空,由大于6位的字母和数字组成"
                  });
                  jQuery("#repassword").validate({
                      expression: "if ((VAL == jQuery('#password').val()) && VAL) return true; else return false;",
                      message: "两次输入的密码不一致"
                  });
                  jQuery("#email").validate({
                      expression: "if (isVEmail(VAL)) return true; else return false;",
                      message: "请输入正确的邮箱地址"
                  });
                  jQuery("#birthday").validate({
                      expression: "if (isVDate(VAL)) return true; else return false;",
                      message: "请输入出生年月"
                  });
                jQuery('#item').validated(function(){
					//alert("通过验证");
                	 ajax_submit('yes','no','修改','${approot}${rooturi}/edit','${approot}${rooturi}/list/menu/0/0');
				});
            });
            /* ]]> */
        </script>

</head>  
  <body style="background:#E8F5FE; padding:15px 18px;" class="scroll_r">
<div id="right_w"><p>当前位置：会员管理 >>添加会员</p></div>

<div class="add clear">
<form method="post" action="" id="item">
<table width="60%" border="0" cellpadding="0" cellspacing="0" class="add_table">
  <tr>
    <td width="21%"><span class="right">会员名</span></td>
    <td width="79%"><input type="text" name="name" id="name" value="${item.name}"/> 
      <span class="red">*</span> </td>
    </tr>
  <tr>
    <td width="21%"><span class="right">会员别名</span></td>
    <td width="79%"><input type="text" id="nickName" name="nickName" value="${item.nickName}">
      <span class="red">*</span> </td>
    </tr>
  <tr>
    <td width="21%"><span class="right">登录密码</span></td>
    <td width="79%"><input type="password" name="password" value="" id="password">
      <span class="red">*</span> </td>
    </tr>
  <tr>
    <td width="21%"><span class="right">重输密码</span></td>
    <td width="79%"><input type="password" name="" value="" id="repassword"> 
      <span class="red">*</span> </td>
    </tr>
  <tr>
    <td width="21%"><span class="right">电子邮箱</span></td>
    <td width="79%"><input type="text" name="email" id="email" value="${item.email}"/> 
      <span class="red">*</span> </td>
    </tr>
  <tr>
    <td width="21%"><span class="right">生日</span></td>
    <td width="79%"><input type="text" id="birthday" name="birthday" value="${item.birthday}" class="Wdate" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',alwaysUseStartDate:true})"/>
      <span class="red">*</span> </td>
    </tr>
     <tr>
    <td width="21%"><span class="right">性别</span></td>
    <td width="79%">
    <input type="radio" name="sex" value="0" <c:if test='${item.sex==0}'>checked='checked'</c:if>/>保密
    <input type="radio" name="sex" value="1" <c:if test='${item.sex==1}'>checked='checked'</c:if>/>男
    <input type="radio" name="sex" value="2" <c:if test='${item.sex==2}'>checked='checked'</c:if>/>女
      <span class="red">*</span> </td>
  </tr>
  
   <tr>
   <th width="20%"><span style="color:#ff0000; margin:0;">*</span>性别：</th>
   <td width="80%">
   <select name="sex" id="sex">
   <option value="-1" <c:if test="${item.sex=='-1'}">selected="selected"</c:if>>请选择</option>
   <option value="2" <c:if test="${item.sex=='2'}">selected="selected"</c:if>>女</option>
   <option value="1" <c:if test="${item.sex=='1'}">selected="selected"</c:if>>男</option>
   </select>
   </td>
  </tr>
  
  <tr>
  <td colspan="2" align="center">
   <input type="hidden" name="id" value="${item.id}"/>
    <input class="button_0" name="" type="submit" value="提交"/>  
  <input class="button_0" name="" type="button" value="返回" onclick="history.go(-1)"/>  
  </td>
  </tr>



</table>

</form>
</body>
</html>
